useFixture(default)

def test():
	from Modules import commonBits
	java_recorded_version = '1.5.0_11'

	if window('Protocol Buffer Editor'):
		select('FileChooser', commonBits.sampleDir() + 'Ams_LocDownload_20041228.bin')
		#commonBits.setRecordLayout(select, 'ams Store')
		click('Edit1')
		select('Table', 'rows:[0,4,8,13,18,23,27],columns:[4|Loc_Name]')
		select_menu('View>>Table View #{Selected Records#}')
##		select('Table2', 'rows:[0,4,8,13,18,23,27],columns:[4|Loc_Name]')
		select('Table', 'cell:3|Loc_Type,1(ST)')
		assert_p('Table', 'Content', '[[TAR, 5839, DC, DC - Taras Ave, , 30-68 Taras Ave, Altona North, 3025, VIC, A], [TAR, 5015, ST, Bankstown, Bankstown, Unit 2, 39-41 Allingham Street, Condell Park, 2200, NSW, A], [TAR, 5037, ST, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda, 2228, NSW, A], [TAR, 5074, ST, Campbelltown, Campbelltown Mall, 303 Queen Street, Campbelltown, 2560, NSW, A], [TAR, 5091, ST, Chatswood, Frenchs Forest, Unit 2-3, 14 Aquatic Drive, Frenchs Forest, 2086, NSW, A], [TAR, 5157, ST, Chirnside Park, Kilsyth South, Lot 3 & 4 Southfork Drive, Kilsyth Park, 3137, VIC, A], [TAR, 5170, ST, Bondi, Building B, Portside Distribution Centre, 2-8 McPherson Street, Botany, 2019, NSW, A]]')
		select('Table', 'cell:4|Loc_Name,3(Campbelltown)')
		assert_p('Table', 'Text', 'Campbelltown', '4|Loc_Name,3')
		select('Table', 'cell:4|Loc_Name,1(Bankstown)')
		rightclick('Table', '4|Loc_Name,1')
		select_menu('Edit Record')
##		select('Table1', 'cell:4|Loc_Name,1(Bankstown)')
		select('Table', 'cell:Data,4(Bankstown)')
		assert_p('Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5015, 5015], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Bankstown, Bankstown], [Loc_Addr_Ln1, 5, , Bankstown, Bankstown], [Loc_Addr_Ln2, 6, , Unit 2, 39-41 Allingham Street, Unit 2, 39-41 Allingham Street], [Loc_Addr_Ln3, 7, , Condell Park, Condell Park], [Loc_Postcode, 8, , 2200, 2200], [Loc_State, 9, , NSW, NSW], [Loc_Actv_Ind, 10, , A, A]]')
		select('Table', 'cell:Data,4(Bankstown)')
		click('RightM')
		select('Table', 'cell:Data,4(Building B, Portside Distribution Centre)')
		assert_p('Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5170, 5170], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Bondi, Bondi], [Loc_Addr_Ln1, 5, , Building B, Portside Distribution Centre, Building B, Portside Distribution Centre], [Loc_Addr_Ln2, 6, , 2-8 McPherson Street, 2-8 McPherson Street], [Loc_Addr_Ln3, 7, , Botany, Botany], [Loc_Postcode, 8, , 2019, 2019], [Loc_State, 9, , NSW, NSW], [Loc_Actv_Ind, 10, , A, A]]')
		select('Table', 'cell:Data,4(Building B, Portside Distribution Centre)')
		click('LeftM')
		select('Table', 'cell:Data,5(30-68 Taras Ave)')
		assert_p('Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5839, 5839], [Loc_Type, 3, , DC, DC], [Loc_Name, 4, , DC - Taras Ave, DC - Taras Ave], [Loc_Addr_Ln1, 5, , , ], [Loc_Addr_Ln2, 6, , 30-68 Taras Ave, 30-68 Taras Ave], [Loc_Addr_Ln3, 7, , Altona North, Altona North], [Loc_Postcode, 8, , 3025, 3025], [Loc_State, 9, , VIC, VIC], [Loc_Actv_Ind, 10, , A, A]]')
		select('Table', 'cell:Data,5(30-68 Taras Ave)')
		click('RightM')
		click('Left')
		select('Table', 'cell:Data,5(Lot 3 & 4 Southfork Drive)')
		assert_p('Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5157, 5157], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Chirnside Park, Chirnside Park], [Loc_Addr_Ln1, 5, , Kilsyth South, Kilsyth South], [Loc_Addr_Ln2, 6, , Lot 3 & 4 Southfork Drive, Lot 3 & 4 Southfork Drive], [Loc_Addr_Ln3, 7, , Kilsyth Park, Kilsyth Park], [Loc_Postcode, 8, , 3137, 3137], [Loc_State, 9, , VIC, VIC], [Loc_Actv_Ind, 10, , A, A]]')
		select('Table', 'cell:Data,5(Lot 3 & 4 Southfork Drive)')
		click('Left')
		select('Table', 'cell:Data,5(Unit 2-3, 14 Aquatic Drive)')
		assert_p('Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5091, 5091], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Chatswood, Chatswood], [Loc_Addr_Ln1, 5, , Frenchs Forest, Frenchs Forest], [Loc_Addr_Ln2, 6, , Unit 2-3, 14 Aquatic Drive, Unit 2-3, 14 Aquatic Drive], [Loc_Addr_Ln3, 7, , Frenchs Forest, Frenchs Forest], [Loc_Postcode, 8, , 2086, 2086], [Loc_State, 9, , NSW, NSW], [Loc_Actv_Ind, 10, , A, A]]')
	close()
